<?php
	include_once 'constants.php';  
	
	define('ALLOW_DEBUG', true);
	define('TEST_MODE', true);
	
	// define introduction page
	define('STARTING_PAGE', 'home');
	
	// define resource directories
	define('WORKING_DIR', '/rezervacia/');
	define('URL_HOME', 'http://'.$_SERVER['HTTP_HOST'].constant('WORKING_DIR'));
	
	define('ROOT_DIR', $_SERVER['DOCUMENT_ROOT'].constant('WORKING_DIR'));
	
	define('TEMPLATE_DIR', 'templates/');
	define('BASE_DIR', 'base/');
	define('LIB_DIR', 'lib/');
	define('MODEL_DIR', 'models/');
	define('RESOURCE_DIR', 'resources/');
    define('SVC_DIR', 'svc/');
    define('EXT_SVC_DIR', constant('URL_HOME') . 'svc/');
    define('IMAGE_DIR', constant('RESOURCE_DIR').'images/');
	define('EXT_IMAGE_DIR', constant('URL_HOME').'resources/images/');
	define('PLUGIN_DIR', constant('RESOURCE_DIR').'plugins/');
	define('PHP_PLUGIN_DIR', constant('PLUGIN_DIR').'php/');
	define('JS_PLUGIN_DIR', constant('PLUGIN_DIR').'js/');
	define('EXT_RESOURCE_DIR', constant('URL_HOME').'resources/');
	define('EXT_JS_PLUGIN_DIR', constant('EXT_RESOURCE_DIR').'plugins/js/');
	define('EXT_TEMPLATE_DIR', constant('URL_HOME').'templates/');
	define('EXT_MODEL_DIR', constant('URL_HOME').'models/');
	
	
	// Load base classes
	require(constant('BASE_DIR').'baseController.php');
	require(constant('BASE_DIR').'baseDataAccess.php');
	require(constant('BASE_DIR').'baseModel.php');
	require(constant('BASE_DIR').'general.php');
	
    // Load plugins
	require(constant('PHP_PLUGIN_DIR').'Smarty-3.0.8/Smarty.class.php');
	define('SMARTY_CACHE_DIR', constant('ROOT_DIR').'/cache');
	define('SMARTY_COMPILE_DIR', constant('ROOT_DIR').'/compiled');

    general::includeDir(constant('LIB_DIR'));
    general::includeDir(constant('LIB_DIR') . "/php/");
    general::includeDir('../'.constant('LIB_DIR'));
    general::includeDir('../'.constant('LIB_DIR') . "/php/");

    // DB settings;
	define('DB_SERVER','localhost');
	define('DB_USER','beania');
	define('DB_PASSWORD','b34n14%DB');
	define('DB_NAME','beania');

	// Load Models
	general::includeDir(constant('MODEL_DIR'));	
	general::includeDir('../'.constant('MODEL_DIR'));		
	
	// Mal settings;
	define('MAIL_DEFAULT','rezervacia@beania.info');
	define('MAIL_INFO','info@beania.info');
	
	
	
	// prohibit some modules from unauthorized access
	$prohibited_templates = array('debug/debug', 'order_administration/statistics');
	$GLOBALS['PROHIBITED_TEMPLATES'] = $prohibited_templates;
	
	// or redirect others
	$redirect_templates = array();
	$GLOBALS['REDIRECT_TEMPLATES'] = $redirect_templates;

	
?>